export default {
    namespaced: true,
    state: {
        location: null,
        scopeOut: null,
        storeList: [],
        loadMenu: false
    },
    getters: {
        getLocation: (state) => {
            return state.location;
        },
        getScopeOut: (state) => {
            return state.scopeOut;
        },
        getStoreList: (state) => {
            return state.storeList;
        },
        getLoadMenu: (state) => {
            return state.loadMenu;
        }
    },
    actions:{
        updateLocation ({commit}, position){
            commit('UPDATE_LOCATION', position);
        },
        updateScopeOut ({commit}, position){
            commit('UPDATE_SCOPEOUT', position);
        },
        updateStoreList ({commit}, obj){
            commit("UPDATE_STORELIST" ,obj);
        },
        updateLoadMenu ({commit}){
            commit("UPDATE_LOADMENU");
        }
    },
    mutations: {
        UPDATE_LOCATION (state, position) {
            state.location = position;
        },
        UPDATE_SCOPEOUT (state, position) {
            state.scopeOut = position;
        },
        UPDATE_STORELIST (state, obj){
            state.storeList = obj;
        },
        UPDATE_LOADMENU (state){
            state.loadMenu = true;
        }
    }
}